<?php
header("content-type:text/html;charset=utf-8");
$db=@new mysqli("localhost","root","123123","xbs_bbs");
if($db->connect_errno){
    echo "错误信息为：".$db->connect_error;
}
$db->query("set names utf8");

$sql="select * from stus";
$res=$db->query($sql);
if($db->errno){
    echo "错误信息为：".$db->error;
}
$a=$res->fetch_assoc();
var_dump($a);
$a=$res->fetch_row();
var_dump($a);
echo "<hr>";
$sql1="insert into stus(name,num) values('小很','25')";
$b=$db->query($sql1);
if($b){
    echo "插入成功";
    echo "受影响".$db->affected_rows."条";
}
echo "<hr>";
$sql2="desc stus";
$c=$db->query($sql2);
$res=$c->fetch_assoc();
var_dump($res);